package org.esgi.server.dns.conf;

import java.io.FileReader;
import java.util.Properties;
/**
 * 
 * @author amine
 *
 */
public class Config {

	static boolean init = false;
    static Properties props = new Properties();
    /**
     * 
     * @param filename
     */
	public static void setFile(String filename) {
		try {
			props.load(new FileReader(filename));
			init = true;
		} catch (Exception e) {
			init = false;
			e.printStackTrace();
		}
		
	}
	/**
	 * 
	 * @param key
	 * @return
	 */
	public static String get(String key) {
		if (init )
			return props.getProperty(key);
		return null;
	}
}
